\rcube_base_replacer

Helper class to turn relative urls into absolute ones using a predefined base

Summary

Methods
Properties
Constants
__construct()
callback()
replace()
absolute_url()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$base_url
N/A

Properties

$base_url

$base_url

Methods

__construct()

__construct(string  $base) : mixed

Class constructor

Parameters

string $base

Base URL

Returns

mixed —

callback()

callback(array  $matches) : string

Replace callback

Parameters

array $matches

Matching entries

Returns

string —

Replaced text with absolute URL

replace()

replace(string  $body) : string

Convert base URLs to absolute ones

Parameters

string $body

Text body

Returns

string —

Replaced text

absolute_url()

absolute_url(string  $path, string  $base_url) : string

Convert paths like ../xxx to an absolute path using a base url

Parameters

string $path

Relative path

string $base_url

Base URL

Returns

string —

Absolute URL